package com.wanqing.community.manager;

import java.util.List;
import java.util.Map;

import com.wanqing.community.bean.UserBean;
import com.wanqing.community.util.CommunityException;
import com.wanqing.community.util.ConditionParse;

/**
 * 用户Manager层接口
 *  
 * Copyright 2014 
 * All right reserved.
 * @version 
 * Company 
 */
public interface UserLoginManager {
	
	/**
	 *<p>Description:添加用户<p>
	 * <p>modifiContent:</p>
	 * @param list
	 * @return int
	 * @throws CommunityException
	 */
	boolean addUserLogin(UserBean user) throws CommunityException;
	
	/**
	 * 批量添加
	 * <p>Description:<p>
	 * <p>modifiContent:<p>
	 * @param list
	 * @return
	 */
	boolean addUserLogin(List<UserBean> list) throws CommunityException;
	
	/**
	 * 
	 *<p>Description:删除用户<p>
	 * <p>modifiContent:</p>
	 * @param list
	 * @return
	 */
  	 boolean deleteUserLogin(List<String> list);
	
  	 /**
  	  * 
  	  *<p>Description:修改用户<p>
  	  * <p>modifiContent:</p>
  	  * @param user
  	  * @return
  	  */
	 boolean updateUserLogin(UserBean user);
	
	 /**
	  * 
	  * <p>Description:用户登录<p>
	  * <p>modifiContent:<p>
	  * @param loginName
	  * @param loginPwd
	  * @return
	  * @throws CommunityException
	  */
	 UserBean userLogin(String loginName,String loginPwd) throws CommunityException;
	 
	 /**
	  * 
	  * <p>Description:分页查询用户信息<p>
	  * <p>modifiContent:<p>
	  * @param condParse
	  * @param currPage
	  * @param pageSize
	  * @throws CommunityException
	  * @return
	  */
	 List<UserBean> queryUser(ConditionParse condParse, int currPage,int pageSize) throws CommunityException;
	 
	 /**
	  * <p>Description:得到用户信息<p>
	  * <p>modifiContent:<p>
	  * @param condParse
	  * @return
	  * @throws CommunityException
	  */
	 int getUserCount(ConditionParse condParse,boolean isAll) throws CommunityException;
	 
	 /**
	  * <p>Description:根据ID查找用户<p>
	  * <p>modifiContent:<p>
	  * @param id
	  * @return
	  * @throws CommunityException
	  */
	 UserBean findUserById(String id) throws CommunityException;
	 
	 /**
	  * <p>Description:根据loginName查找用户<p>
	  * <p>modifiContent:<p>
	  * @param id
	  * @return
	  * @throws CommunityException
	  */
	 UserBean findUserByEmail(String email) throws CommunityException;
	 /**
	  * <p>Description:修改密码<p>
	  * <p>modifiContent:<p>
	  * @param userLogin
	  * @return
	  * @throws CommunityException
	  */
	 boolean updatePwd(UserBean userLogin) throws CommunityException;
	 
	
	 List<UserBean> listUser() throws CommunityException;
	 
	 
	 /**
	 * <p>Description:查询用户参照总数<p>
	 * @author WJX
	 * @version 2014-11-24
	 * @modifier WJX
	 * @modifiDate 2014-11-24
	 * <p>modifiContent:<p>
	 */
	 int getRefUserCount(Map<String, Object> queryMap)throws CommunityException;
	 
	 /**
	 * <p>Description:以分页方式查询用户参照列表<p>
	 * @author WJX
	 * @version 2014-11-24
	 * @modifier WJX
	 * @modifiDate 2014-11-24
	 * <p>modifiContent:<p>
	 */
	 List<UserBean> listRefUser(Map<String, Object> queryMap,int currPage,int pageSize) throws CommunityException;
}
